<?php

namespace app\base\controller;

use think\Controller;
use think\Request;
use think\Lang;
class Setlang extends Controller
{

    /**
     * 缓存当前语言
     *
     * @return \think\Response
     */
    public function Setlang()
    {   
        if(request()->isAjax()){
            // $lang=Lang::detect();
            $lang=input('lang');
            cookie('think_var',$lang);
            return json(1);
        }
    }

    


}
